Automatic battery and charging system tester with motor-driven carbon pile loading

ABSTRACT

A battery and charging system tester includes an automatically-operated carbon pile for loading the battery, the pile having a shaft therethrough rotated by a stepper motor, and a compression nut threadedly engaged with the shaft for movement into and out of engagement with the carbon pile in response to rotation of the shaft for varying the compression of the pile and, thereby, the impedance thereof. Probes are provided for sensing battery load current and output voltage, and the output current of an alternator charging unit. A feedback control circuit including a microprocessor operating under stored program control converts the analog probe outputs to digital signals and compares the battery output voltage and load current to selectively variable references for controlling the stepper motor to vary the battery load so as to regulate either the battery load current or the battery output voltage to a predetermined reference value, depending upon the test being performed. A selectively variable timer controls the time period during which the battery is loaded. A display indicates the reference values, the values of the parameters being regulated and the state of the timer.

RELATED APPLICATIONS

This is a continuation-in-part of U.S. application Ser. No. 660,163,filed Feb. 25, 1991, now abandoned, which application is, in turn, acontinuation of U.S. application Ser. No. 405,447, now abandoned, filedSep. 11, 1989.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to devices for testing batteries, such asautomotive batteries, and the charging systems therefor. The inventionrelates in particular to devices for testing the output voltage of abattery and the output current of an alternator for charging thebattery, when the battery is under loaded conditions.

2. Description of the Prior Art

One of the standard tests for an automotive battery is a test of itscapacity by monitoring its output voltage when it is under a load. Suchload testing of a battery involves loading of the battery to a specifiedload current (such as one-half the rated cold cranking amperage) for agiven period of time (such as about fifteen seconds), while monitoringthe battery output voltage. If it exceeds a predetermined minimumvoltage, the battery capacity is deemed adequate. Loading isaccomplished by installing a variable impedance element, such as acarbon pile, across the battery. The electrical load resistance of thecarbon pile is adjusted by manually turning a knob which is coupled to athreaded shaft which squeezes the carbon discs of the pile between apair of brass plates. These brass plates are wired to the battery undertest by means of heavy cables. Squeezing the carbon discs reduces theresistance between the discs, thereby increasing the load currentthrough the battery.

Battery voltage is measured across the battery terminals using avoltmeter. Load current can be measured by scaling the voltage dropacross a low-resistance, low-temperature-coefficient, series resistor orby using a nonintrusive, inductive probe with associated amplifiers. Theuser monitors the battery voltage while loading the battery with thecarbon pile so as to maintain the specified load current.

The temperature within the carbon pile rises quickly as heavy currentpasses through it. This causes the resistance of the carbon pile tofurther decrease, thereby further increasing the load current. This ispartly because carbon has a negative temperature coefficient ofresistance, and also because the carbon discs may expand slightly withincreased temperature, thereby effectively increasing the compression ofthe pile. The manual load control must, therefore, be continuouslyreadjusted to maintain the load at about the predetermined current levelthroughout the test period, which is sometimes difficult to achieve.This difficulty is aggravated by the fact that the manual load controlis biased to the zero load condition so that a high load will notinadvertently be left on the battery.

Loading of the battery is also involved in testing the alternatorcurrent output. For this test alternator current is measured directly bya suitable probe, such as a Hall effect current measuring probeencircling the alternator output cable. The automobile engine isoperated at a moderate speed sufficient to ensure maximum alternatoroutput, and then the battery load is varied with the carbon pile, whilethe operator monitors the alternator current output, taking note of andremembering the maximum current reading. If the maximum output currentis sufficiently close to (e.g., within 10% of) the rated output, thenthe alternator is considered good.

It will be appreciated that this test operation is, of necessity, atwo-person job or, at best, a difficult one-person job. Thus, one handis required to hold the engine throttle to maintain a desired enginespeed, another hand is required to manipulate the carbon pile, and thenboth battery output voltage and alternator current have to besimultaneously monitored. Most manufacturers specify a loaded batteryoutput voltage at which the maximum alternator output should beachieved, so the operator must manipulate the carbon pile knob toattempt to maintain that load voltage. While he watches a voltagemonitor to be sure that the proper voltage range is maintained, he mustalso constantly monitor an alternator output current display so that hedoes not miss the peak output current value.

SUMMARY OF THE INVENTION

It is a general object of the present invention to provide an improvedbattery and charging system test apparatus which avoids thedisadvantages of prior test apparatus, while affording additionalstructural and operating advantages.

An important feature of the invention is the provision of a carbon pileload apparatus which is automatically feed-back controlled so as toregulate or maintain a specified parameter of the circuit being loaded.

Another feature of the present invention is the provision of anautomatic battery loading apparatus.

In connection with the foregoing feature, it is another feature of theinvention to provide a battery loading apparatus of the type set forth,wherein the loading element is a carbon pile.

Still another feature of the invention is the provision of a batteryloading apparatus which will automatically regulate the load current ata predetermined level. Another feature of the invention is the provisionof an apparatus for testing the output current of an alternator in abattery charging system while regulating the battery load voltage.

These and other features of the invention are attained by providingapparatus for automatically loading a test circuit in accordance with avariable parameter thereof which varies with the load, comprising:carbon pile electrical impedance means adapted to be connected in thetest circuit for loading thereof, compression means coupled to theimpedance means for varying the compression thereof and therebyeffecting variation of the impedance thereof, feedback means coupled tothe test circuit for sensing the variable parameter and producing aparameter signal which is a function of the parameter, and drive controlmeans coupled to the compression means and to the feedback means andresponsive to the parameter signal for automatically controlling theoperation of the compression means to vary the impedance of theimpedance means so as to regulate the parameter signal to apredetermined value.

The invention consists of certain novel features and a combination ofparts hereinafter fully described, illustrated in the accompanyingdrawings, and particularly pointed out in the appended claims, it beingunderstood that various changes in the details may be made withoutdeparting from the spirit, or sacrificing any of the advantages of thepresent invention.

BRIEF DESCRIPTION OF THE DRAWINGS

For the purpose of facilitating an understanding of the invention, thereare illustrated in the accompanying drawings preferred embodimentsthereof, from an inspection of which, when considered in connection withthe following description, the invention, its construction andoperation, and many of its advantages should be readily understood andappreciated.

FIG. 1 is a perspective view of a battery tester incorporating a carbonpile and constructed in accordance with and embodying the features of afirst embodiment of the present invention;

FIG. 2 is a partially block and partially schematic circuit diagramillustrating the connection of the battery tester of FIG. 1 to anassociated battery under test;

FIG. 3 is an enlarged view in vertical section through the batterytester of FIG. 1, illustrating the carbon pile thereof;

FIG. 4 is a fragmentary sectional view, taken along the line 4--4 inFIG. 3;

FIG. 5 is a schematic circuit diagram of the battery tester of FIG. 1;

FIG. 6 is a perspective view of a battery and charging system testerconstructed in accordance with and embodying the features of a secondembodiment of the present invention, which incorporates the carbon pileof FIGS. 3 and 4;

FIG. 7 is a schematic circuit diagram of an automotive battery andcharging system of the type with which the testers of FIGS. 1 and 6 aredesigned to be used;

FIG. 8 is a partially schematic and partially functional block diagramof the circuitry of the tester of FIG. 6;

FIG. 9 is a partially schematic and partially block diagram of theanalog circuits of the tester circuitry of FIG. 8;

FIG. 10 is a partially schematic and partially block diagram of thesupply circuits of the tester circuitry of FIG. 8;

FIG. 11 is a partially schematic and partially block diagram of thedigital circuits of the tester circuitry of FIG. 8; and

FIGS. 12A-20E are flow diagrams of the program routines for themicroprocessor of the tester circuitry of FIG. 8, wherein FIG. 12C showsthe relationship of FIGS. 12A and B, and FIG. 20E shows the relationshipof FIGS. 2OA-D.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to FIGS. 1-3, there is illustrated a battery tester, generallydesigned by the numeral 10, constructed in accordance with and embodyingthe features of a first embodiment of the present invention. The batterytester 10 includes a cabinet 11 having a flat, rectangular bottom wall12, a flat, rectangular top wall 13, and a rectangular rear wall 14interconnecting the top and bottom walls 13 and 12 at the rear edgesthereof. Formed in the rear wall 14 adjacent to a lower corner thereofis an opening 15, and formed in the rear wall 14 adjacent to the upperend thereof is a series of ventilation louvers 16. The front of thecabinet 11 is closed by a front panel 17 having a window 18 formedtherein and provided with a rectangular recessed portion 19. A cable set20 including cables 21 and 22 extends from the cabinet 11, the cables 21and 22 being respectively provided at their outer distal ends with clampconnectors 23 and 24 for clamping onto the terminal posts of anautomotive battery B (FIG. 2) in standard fashion. The bottom wall 12may be provided with a plurality of support legs 26 for supporting thecabinet 11 on an associated support surface.

Referring now also to FIG. 4, a mechanically variable impedance in theform of a carbon pile assembly 30 is disposed in the cabinet 11. Thecarbon pile assembly 30 includes a generally U-shaped main mountingbracket 31 having a bight portion 32 and legs adapted to be coupled bysuitable means to an associated wall structure (not shown) in thecabinet 11. The assembly 30 also includes a rear mounting bracket 33which is generally channel-shaped and has a pair of attachment legs 34respectively secured to the legs of the main bracket 31 forinterconnecting same. A carbon pile 35 is disposed between the rearmounting bracket 33 and the bight 32 of the main mounting bracket 31,the carbon pile 35 including a plurality of annular carbon discs 36stacked between front and rear brass terminal plates 38 and 39.

An elongated cylindrical shaft 40 (FIG. 3) extends coaxially through thecarbon pile 35 for rotation with respect thereto. The forward end of theshaft 40 extends outwardly through a complementary opening in therecessed portion 19 of the cabinet front panel 17 and is axiallyretained in place with respect thereto by a suitable coupling includinglock nuts 41. The shaft 40 is provided at its inner end with anexternally threaded portion 42 which is threadedly engaged with arectangular compression nut 43. The nut 43 has an axial recess 44 formedin the outer end thereof for receiving a cylindrical insulator 40aencircling the portion of the shaft 40 which passes through the carbonpile 35. Disposed in the recess 44 and encircling the shaft 40 is ahelical compression spring 45 which bears against the cylindricalinsulator and against the compression nut 43 at the inner end of therecess 44 therein for urging the nut 43 rearwardly.

A plurality of bearing washers 46 are disposed about the shaft 40between the compression nut 43 and the rear terminal plate 39. Theterminal plate 39 is spaced from the rear mounting bracket 33 by aplurality of hollow cylindrical ceramic standoffs 47 which are securedto the rear mounting bracket 33 by fasteners 48, and which maintain apredetermined minimum separation between the rear mounting bracket 33and the rear terminal plate 39. One cable of the cable set 20 is coupledby a suitable connection 49 to the rear terminal plate 39, while theother conductor is coupled by a suitable connection (not shown) to thefront terminal plate 38.

The carbon pile assembly 30 also includes an electric stepper motor 50which is fixedly secured to a bight 51 of a generally U-shaped mountingbracket 52, the legs of which are respectively fixedly secured bysuitable fasteners 53 to the legs of the main mounting bracket 31. Themotor 50 has an output shaft 54 which is coupled by a suitable coupler55 to the shaft 40 for rotation thereof, a plurality of washers 56 beingdisposed between the coupler 55 and the compression nut 43. The frontend of the shaft 40 which projects outwardly beyond the front panel 17of the cabinet 11 is secured to a suitable adjustment knob 58 foreffecting manual rotation of the shaft 40, as will be explained ingreater detail below.

In operation, when the shaft 40 is rotated, the compression nut 43travels axially therealong, either outwardly or inwardly, depending uponthe direction of rotation of the shaft 40, the compression nut 43 beingheld against rotation by engagement with the mounting plate 33. As thecompression nut 43 moves axially outwardly along the shaft 40 againstthe urging of the compression spring 45, it causes the washers 46 tobear against the rear terminal plate 39 for compressing the carbon pile35 between the terminal plates 38 and 39. Compressing the carbon pile 35reduces the resistance between the discs 36 in a well-known manner, thereduction in resistance being proportional to the magnitude of thecompressive force exerted on the carbon pile 35. When the shaft 40 isrotated in the opposite direction, the compression nut 43 is moved awayfrom the carbon pile 35, reducing the compressive force thereon andincreasing the resistance thereof, the movement being aided by thespring 45. It will be appreciated that the shaft 40 may be rotatedmanually by the use of the adjustment knob 58, and may be rotatedautomatically by the use of the stepper motor 50.

Referring now also to FIG. 5 there is illustrated a control assembly,generally designated by the numeral 60, for controlling the operation ofthe stepper motor 50, and thereby the variation in the resistance of thecarbon pile 35. The control assembly 60 includes a motive controlcircuit 61, which is preferably an integrated circuit which includes anup/down, eight-bit binary counter which can operate in either a count-upor a count-down mode to provide a bipolar chopper drive. The motivecontrol circuit 61 provides a parallel binary output to the steppermotor 50, which is a bipolar motor and may be provided with a suitablegear reduction. The bipolar configuration uses 100% of the motorwindings and current flow is switched in a known manner. Thisconfiguration provides a high output of torque at low speeds. It will beappreciated that, as the counter of the motive control circuit 61 countsup, the motor 50 rotates in a first direction to increase thecompressive force on the carbon pile 35, thereby decreasing itsresistance and increasing the load current drawn thereby. When themotive control circuit 61 counts down, the motor 50 is rotated in theopposite direction to decrease the load current drawn by the carbon pile35.

The control assembly 60 is coupled to the cables 21 and 22, and thecarbon pile 35 is connected across the cables 21 and 22. The controlassembly 60 has a feedback circuit 62 which includes a feedback resistor63 connected in series with the carbon pile 35. The control assembly 60further includes a power supply circuit 65. More specifically, aresistor 66 and a capacitor 67 are connected in series between thepositive battery voltage and ground, the junction between the resistor66 and the capacitor 67 being coupled to the input of a voltageregulator 68, the output of which provides a regulated +V supply voltagewhich is preferably +5 VDC. The output of the voltage regulator 68 isalso applied to a voltage inverter 69 which through the operation ofassociated capacitors 69a and 69b, generates a -V supply voltage, whichis preferably -5 VDC. A bypass capacitor 69c provides stabilization toprevent oscillation in the power supply 65.

The voltage drop across the feedback resistor 63 is applied through adifferential amplifier circuit 70 which includes an operationalamplifier 71. More specifically, the positive and negative terminals ofthe feedback resistor 63 are respectively coupled through resistors 72and 73 to the inverting and non-inverting input terminals of theoperational amplifier 71. Also connected between the non-inverting inputterminal and ground is a resistor 74. The output terminal of theoperational amplifier 71 is coupled through a feedback resistor 75 tothe inverting input terminal. The +V and -V supply voltages are appliedto the operational amplifier 71, with capacitors 76 and 77 providingnoise-reducing shunts to ground.

The feedback resistor 63 may have a resistance of 250 micro-ohms, inwhich case a current of 500 amps therethrough will develop a voltagedrop across it of 125 millivolts. The amplifier 70 provides adifferential input circuit which references the voltage drop across thefeedback resistor 63 to ground. It will be appreciated that the voltagedrop across the feedback resistor 63 is proportional to the load currentthrough the carbon pile 35. The operational amplifier 71 is preferablyset to a gain of -1.

The output of the operational amplifier 71 is coupled through a trim pot78 to the inverting input terminal of a scale adjustment operationalamplifier 80, which is arranged in an inverting configuration with thenon-inverting input terminal thereof being coupled through a resistor 81to ground. The output terminal of the operational amplifier 80 iscoupled through a feedback resistor 82 to the inverting input terminal.The +V and -V supply voltages are applied directly to the operationalamplifier 80 through connections which are respectively provided withsuitable noise bypass capacitors 85 and 86. The -V supply voltage isalso applied through a resistor 83 and a potentiometer 84. The gain ofthe operational amplifier 80 is established by the ratio of theresistance of the feedback resistor 82 to that of the trim pot 78. Theresistor 81 serves to limit input offset currents, and the resistor 83and the potentiometer 84 provide offset voltage compensation.Preferably, the gain of the operational amplifier 80 is set at -4,yielding an output of 0.5 volts for the -0.125 volt input from thedifferential amplifier 70.

The output of the operational amplifier 80 is coupled through a resistor87 to the non-inverting input terminal of an operational amplifier 90,which is configured as a voltage comparator. The inverting inputterminal of the operational amplifier 90 is coupled to the wiper of apotentiometer 92, which is connected in series with a resistor 91between the +V supply and ground. The +V and -V supply voltages are alsoapplied directly to the operational amplifier 90. The output terminal ofthe operational amplifier 90 is coupled through a feedback resistor 93to the non-inverting input terminal thereof. The potentiometer 92 ispreferably mounted on the front panel 17 of the cabinet 11, and a presetvoltage is established through the resistor 91 and the potentiometer 92,the values of which are selected to provide a 0 to 0.5 volt range intothe inverting input terminal of the operational amplifier 90. Theresistor 93 provides hysteresis across the comparator to slow down the"searching" rate of the feedback-control circuit 62. Functionally, whenthe scaled load "feedback" voltage from operational amplifier 80 islower than the preset level, the output of the operational amplifier 90is low (e.g., -5 volts). When the output from the operational amplifier80 is higher than the preset level, the output of the operationalamplifier 90 is high (e.g. +5 volts).

The output from the comparator operational amplifier 90 is appliedthrough a resistor 94 to the base of a transistor 95, the emitter ofwhich is grounded and the collector of which is coupled through aresistor 96 to the +V supply. The collector of the transistor 95 is alsocoupled to the motive control circuit 61. The transistor 95 functions asan inverter and serves to make the output from the comparatoroperational amplifier 90 single-ended, i.e., non-negative going. Thusthe low output from the operational amplifier 90 will become +5 volts,corresponding to a logical "1", while the high output from operationalamplifier 90 will become 0 volts, corresponding to a logical "0". Theresistor 94 provides current limiting into the base of the transistor95, and the resistor 96 provides the collector load. The collector ofthe transistor 95 provides a direction control signal to the motivecontrol circuit 61 to tell it in which direction to count, for therebycontrolling the direction of rotation of the stepper motor 50.

The count-up, count-down function is provided by an integrated circuitcount rate oscillator 100. The oscillator 100 is provided with the +Vsupply voltage and has an oscillator input coupled through a resistor101 to the output terminal of the oscillator and through a capacitor 102to ground, the values of the resistor 101 and the capacitor 102determining the count rate. A bypass capacitor 103 is connected toground to stabilize the oscillator 100 and to eliminate spikes from thehigh speed switching of the motive control circuit 61. The oscillator100 is a free running oscillator and preferably has an output of about300 Hz, which is applied through a resistor 104 to the base of atransistor 105, which is configured as an inverter, with its emittergrounded and with its collector providing an output signal to the motivecontrol circuit 61.

The control assembly 60 also includes an integrated circuit timeroscillator 110. A resistor 111 is connected across input terminals ofthe timer oscillator 110, the resistor 111 being connected in serieswith a normally-open push-button start switch 112 between the +V supplyvoltage and ground. A capacitor 113 is connected in parallel with thestart switch 112. Capacitors 114 and 115 are connected to otherterminals of the timer oscillator 110. A resistor 116 and a trim pot 117are connected in series between the +V supply and another input terminalof the timer oscillator 110. Another input terminal of the timeroscillator 110 is connected through a resistor 118 to the +V supplyvoltage and through a normally-open push-button stop switch 119 toground, a capacitor 120 being connected in parallel with the stop switch119. The timer oscillator 110 has an output terminal 121 coupled to themotive control circuit 61.

In operation, when the start switch 112 is closed, the timer oscillator110 starts to time out a predetermined time period, which time period isset by the values of the capacitor 115 and the combined resistance ofthe resistor 116 and the trim pot 117. When the timer is triggered, thetimer oscillator 110 will produce an output signal on its outputterminal 121 to the motive control circuit 61 to enable that circuit,this output signal continuing as long as the timer is operating. Thestop switch 119 is connected so that if it is closed before the timerhas timed out, it will terminate the output signal on the conductor 121and reset the timer to zero. The resistors 111 and 118 are pull-upresistors for the start switch 112 and the stop switch 119,respectively, and the capacitors 113 and 120 are for noise reduction andthe capacitor 114 is for stabilization and spike elimination.Preferably, the start switch 112 and the stop switch 119 are mounted onthe front panel 17 of the cabinet 11. Preferably, the predetermined timeperiod of the timer oscillator 110 is set for about a 15-second testperiod. The potentiometer 117 may be mounted on the front panel 17 ofthe cabinet 11.

Preferably, indicating meters are provided for monitoring the operationof the battery tester 10. In particular, a voltmeter 122 is coupledacross the battery terminals, i.e., across the cables 21 and 22, tocontinually monitor the output voltage of the battery B. A volt meter123 may be connected to the output terminal of the scale adjustoperational amplifier 80 for monitoring the scaled feedback voltagemeasured across the feedback resistor 63, which is proportional to theload current through the carbon pile 35. The meters 122 and 123 may bemounted inside the front panel 17 of the cabinet 11 for display throughthe window 18. The meter 123 may be calibrated in amperes to directlyread the load current. There may also be provided a meter 124 coupled tothe wiper of the potentiometer 92 for monitoring the preset voltagelevel, which is proportional to the predetermined load current which isto be maintained by the control assembly 60. This meter may also becalibrated to read load current directly, and may also be mounted in thecabinet 11 for display through the window 18 or another suitable window.

In operation, the potentiometer 117 is adjusted to set the predeterminedtime period of the timer oscillator 110. The clamp connectors 23 and 24are then connected to the terminals of the battery B and the carbon pile35 is manually adjusted by means of the adjustment knob 58 to zero thecarbon pile 35, i.e., to relieve the pressure on it until asubstantially zero load current reading is obtained on the meter 123.The potentiometer 92 is adjusted until the meter 124 reads the desiredpredetermined load current which is to be maintained during the batterytest.

The start switch 112 is then closed, triggering the timer oscillator 110to initiate the predetermined time period and generate the output signalon terminal 121 for enabling the motive control circuit 61. Since thecarbon pile 35 has been initially zeroed, there will initially be anegligible load current. Thus, the voltage measured by the meter 123will be much less than the preset voltage, so that the output of thecomparator 90 will be a logical "0", which causes the counter in themotive control circuit 61 to operate in a count-up mode to start tocount at the rate determined by the count rate oscillator 100 to stepthe motor 50 in a first direction for compressing the carbon pile 35.The load current through the carbon pile 35 will rapidly increase as itis compressed until the feedback voltage, as measured by the meter 123,is substantially equal to the preset voltage, as measured by the meter124.

Should the temperature of the carbon pile 35 cause a reduction of load,the counter of the motive control circuit 61 is again switched into thecount-up mode for maintaining the predetermined load current. Similarly,should the feedback voltage increase beyond the preset value, thecounter in the motive control circuit 61 is switched into a count-downmode to reduce the applied load to the predetermined level. The feedbackcircuit 62 will continue to "hunt" in this manner about thepredetermined load level until the predetermined time period of thetimer oscillator 110 terminates. Upon removal of the output signal fromthe timer oscillator 110, the counter in the motive control circuit 61will count back down to zero for essentially removing the load appliedby the carbon pile. During the test, the operator will monitor thevoltmeter 122 to determine the loaded output voltage of the battery B.

In a constructional model of the battery tester 10, the operationalamplifiers 71 and 80 may be of the type designated LM725C and sold byNational Semiconductor, while the operational amplifier 90 may be of thetype designated LM393 and sold by Motorola. The voltage regulator 68 maybe of the type designated LM7805 and sold by National Semiconductor. Thevoltage inverter 69 may of the type designated ICL766ON sold byIntersil. The count rate oscillator circuit 100 and the timer oscillatorcircuit 110 may both be timer circuits of the type designated LM555 andsold by National Semiconductor. The motive control circuit 61 may be abipolar motor drive driver module of the type designated GS-D200 andsold by SGS Thomson, or a bipolar stepper drive of the type designatedSD2 and sold by PKS Digiplan Ltd.

In FIG. 6, there is illustrated an alternative tester 200, constructedin accordance with another embodiment of the invention, for use intesting an automotive battery B or a charging system 150 therefor, ofthe type illustrated in FIG. 7. In the charging system 150, the positiveterminal of the battery B is connected through a junction block 151, anignition switch 152 and an indicator light 153 to the internal regulatorof an alternator 154, the output of the alternator 154 being connectedby a conductor 155 through the junction block 151 to the battery B. Itwill be appreciated that the alternator 154 converts mechanical energyfrom the auto vehicle engine to an alternating electrical current("AC"), and then rectifies the AC into direct current ("DC") forcharging the battery B. While most recent automobiles have alternatorswith internal regulators, it will be appreciated that the chargingsystem 150 could also include an alternator with an external voltageregulator.

Referring now to FIG. 6, the tester 200 is housed in a box-like cabinet201 having a rectangular front panel 202 with a rectangular window 203in the upper portion thereof covering an LCD display panel 220, forviewing thereof. It will be appreciated that a carbon pile assembly 30of substantially the same type as is illustrated in FIGS. 3 and 4, ishoused in the cabinet 201. A load set knob 205 is disposed on the frontpanel 202, but it is not coupled to the shaft 40 of the carbon pileassembly 30. Rather, it is coupled to the shaft of a rotary encoder 243(see FIG. 8), which is mounted behind the front panel 202. The tester200 is provided with a Hall probe 206 coupled to the circuitry in thecabinet 201 by a cable 207, and is also provided with a pair of batteryclamps 208, which are respectively connected by cables 209 to thecircuitry of the tester 200. Also formed on the front panel 202 is akeyboard 210 including three START keys 211, 212 and 213, an ON/OFF key,a ZERO key, a BATTERY/EXTERNAL key, a FREEZE/LIVE key, a STOP/RESET key,and up and down arrow keys. Also projecting from the front panel 202 area pair of External Volts terminals 215.

The LCD display panel 220 includes a number of different displays. Aload display 221 indicates the preset load (either in amps or volts,depending upon the test being conducted), which may be a programmeddefault load or a load manually set by the operator with the load setknob 205. A timer display 222 indicates, in seconds, the time remainingin a selected test. A volts display 223 indicates the voltage beingmonitored, and also indicates whether it is "Battery" volts, in theevent that the battery is being tested, or "External" volts, in theevent that some other voltage in the charging system 150 is beingmonitored. A current display 224 indicates, in amps, the current beingmonitored, either battery load current or alternator output current,depending upon the test being conducted. This current is also displayedgraphically in a bar graph display 225. A "Frozen" display 226 willflash (and all of the other displays will be frozen) when the Freezemode is selected. A "Low Battery" display 227 will flash if the batteryvoltage is too low to safely operate the stepper motor 50 of the carbonpile assembly 30. An alternator diode test display 228 may beselectively turned on to indicate whether the diodes of an alternatorunder test are "Good", "Marginal" or "Bad". When the current readingfrozen on the current display 224 is the maximum current read during analternator test, a "Maximum" display 229 will be illuminated next to thecurrent display 224.

The tester 200 is designed to operate in a number of different modes forperforming a number of different diagnostic tests on a battery and/orthe charging system 150 therefor as well as on the engine startingsystem. However, the present invention deals specifically with only thefollowing tests:

1. Battery Load Test;

2. Alternator Test, including alternator load test and diode test;

Accordingly, only so much of the hardware and software of the tester 200will be described in detail herein as is necessary for a completeunderstanding of the construction and operation thereof as regards theabove-listed tests.

The Battery Load Test is initiated by depressing the START key 211, andit monitors the battery output voltage while the battery is being loadedby the carbon pile assembly 30 to a predetermined load current. TheAlternator Test is initiated by depressing the START key 213, and itmonitors the alternator output current while the battery is being loadedby the carbon pile assembly 30 so as to maintain a predetermined batteryoutput voltage. During this test, the alternator diodes are also tested,the results of the test being indicated in the alternator diode display228, which is toggled on and of f by use of the ON/OFF key. It is alsopossible to conduct a Starter Draw Test, which is initiated bydepression of the START key 212, for monitoring the current draw on thebattery B during operation of the starter motor (not shown). Other testson the charging system 150 may also be conducted by the tester 20. Thus,various voltages in the charging system 150 or starting system may bemonitored by the use of appropriate probe conductors (not shown)connected to the External Volts terminals 215. The volts display 223 maybe toggled between the "Battery" and "External" indications by use ofthe BATTERY/EXTERNAL key, depending upon whether the voltage input beingmonitored is connected at the battery cables 209 or the External Voltsterminals 215.

At the end of a test, the volts display 223 will be frozen at the lastvoltage reading and the current display 229 will be frozen at either thelast amps reading or, in the case of an Alternator Test, at the maximumamps reading registered during the test. In this latter case, the"Maximum" display 229 will also be activated. At any time the operatormay freeze the displays by pressing the FREEZE/LIVE key, which will alsocause the "Frozen" display 226 to flash. Selecting the freeze mode willalso terminate any test which was in progress. The displays will remainfrozen until the FREEZE/LIVE key is again toggled.

A timer in the tester 200 is set at a default time, e.g., 15 seconds,for both the Battery Load Test and the Alternator Test. The timer istriggered by actuation of the appropriate START key, and when the timertimes-out the selected test will terminate. However, the user canmanually increment or decrement the timer to increase or decrease thetest time at any time before or during a test, by actuation of the upand down arrow keys. The user may also, at any time, stop a test inprogress and reset all the displays in the LCD display panel 220 byactuating the STOP/RESET key. If the ZERO key is actuated, the currentdisplay 224 will be zeroed, i.e., the current then being registered willbe considered to be the zero level, as explained more fully below.

Referring now also to FIG. 8, the circuitry of the tester 200 will begenerally described. The signals acquired by the several probes andleads are applied to analog circuits 230. More specifically, there isinput to the analog circuits 230 a HALL PROBE signal, which is a currentsignal from the Hall probe, a BATT VOLT signal from the battery clamps208 and an EXT VOLT signal from the leads (if any) connected to theExternal Volts terminals 215. The Hall probe cable 207 contains a numberof conductors (see FIG. 9), and the Hall probe 206 is in the form of apliers-type clamp which contains a Hall integrated circuit chip and isadapted to be clamped in encircling relationship about acurrent-carrying conductor, such as the alternator output conductor 155,for sensing the current therethrough in a known manner. Each of thebattery clamp cables 209 is in the nature of a heavy bundle of copperwires adapted for carrying large currents, but in the center of thebundle is a separately insulated messenger wire. It is from thesemessenger wires that the BATT VOLT signal is obtained. This is so thatthe BATT VOLT signal will not be affected by any voltage drop which mayoccur in the heavy gauge, high-current portion of the cables 209.

The carbon pile assembly 30 is connected in series with the feedbackresistor 63 and the normally-open contacts of a solenoid 242 across theterminals of the battery B. The solenoid 242 is driven by an SOLDRsignal from the supply circuits 235 and returns a signal SOLDOUT to thesupply circuits 235. The voltage drop across the feedback resistor 63 isfed back to the digital circuits 240 as a LOAD SENSE signal which is anindication of the current through the battery. The voltage across thecarbon pile is also applied as a BATT signal to the supply circuits 235which generate therefrom a +6.5 V supply which is, in turn, returned tothe analog circuits 230, as well as to digital circuits 240 for poweringvarious circuits therein. The BATT signal is also provided to a motorcontroller in the supply circuit 235 which supplies drive current, inthe form of a MOTDR signal, for driving the stepper motor 50 forcompressing and decompressing the carbon pile assembly 30. The load setknob 205 is associated with the rotary encoder 243, which outputs to thedigital circuits 240 a digital LOADSET signal which indicates the degreeof rotation of the load set knob 205 and, therefore, the referencecarbon pile load value to which the battery B is be to regulated duringa test. The carbon pile assembly 30 has a "home" position in which nocompressive force is being applied to the carbon pile, and it isprovided with a home switch 244 which is closed when the carbon pileassembly 30 is in its home position, to output a HOME signal to thesupply circuits 235 and the digital circuits 240.

The keyboard 210 is connected to the digital circuits 240 by a cable 285which includes a number of conductors corresponding, respectively, tothe several keys on the keyboard 210. The digital circuits 240 areconnected by a number of lines to the analog circuits 230 and to thesupply circuits 235. These are functionally indicated by single lines inFIG. 8, but it will be appreciated that they may contain more than oneconductor. Thus, a TEST SIG signal, ALTEST 1 & 2 signals, and a DISPLAYSIG signal are applied to the digital circuits 240 from the analogcircuits 230, and SW1 and SW2 signals are applied from the digitalcircuits 240 to the analog circuits 230. A LO BATT signal is appliedfrom the supply circuits 235 to the digital circuits 240, while MOT,SOLENOID and DLEN signals are applied from the digital circuits 240 tothe supply circuits 235. The DLEN signal is also applied to a displaydriver 245 for driving the LCD display panel 220. A DISPLAY DATA signaland a V⁺ signal are also applied from the digital circuits 240 to thedisplay driver 245.

Analog Circuits

The basic function of the analog circuits 230 is to provide an interfacebetween the input leads and the remaining circuitry of the tester 200.It receives the analog input signals from the leads and places them inproper condition for handling by the digital circuits 240. Referring toFIG. 9, the analog circuits 230 include a Hall supply 250 which providesa supply to the Hall chip in the Hall probe 206. The current detected bythe Hall probe 206 is applied via the cable 207 to signal conditioningcircuitry 251 which converts the signal from a differential to asingle-ended signal and adjusts its level. The conditioned currentsignal is then applied to a test signal switch 252. Also applied to thetest signal switch 252 are the EXT VOLTS and BATT VOLTS inputs throughvoltage dividers 265 and 266, respectively. The test signal switch 252selects among the three inputs and switches the selected input to theoutput as VPOS and VNEG signals, which cooperate to form the TEST SIGsignal which is applied via the line 267 to the digital circuits 240(FIG. 11). The selection is controlled by SW1 and SW2 control signalsfrom the digital circuits 240. Essentially, the test signal switch 252will toggle between an amps input from the Hall probe 206 and a voltageinput, the voltage input being either the EXT VOLTS input or the BATTVOLTS input, depending upon which has been selected by theBATTERY/EXTERNAL key. For purposes of the following discussion it willbe assumed that the voltage input is the BATT VOLTS input from thebattery clamps 208, and that the External Volts terminals 215 are notused. Thus, the test signal switch 252 will alternate its output betweenthe HALL PROBE input (e.g., alternator output current) and the BATTVOLTS input (e.g., battery output voltage).

The current signal from the signal conditioning circuit 251 is alsoapplied through an amplifier 253 to offset compensation circuitry 254which sums the output of the amplifier 253 with an AMPOFFSET signal fromthe digital circuits 240. The latter signal corresponds to the currentoffset reading registered when the ZERO key is pressed, as is describedmore fully below. The output of the current offset compensationcircuitry 254 is then applied to alternator diode test circuitry 255.More specifically, it is applied to an AC component detection circuit256, for detecting the AC or ripple component of the current signal, andto a low pass filter 257, which has a cutoff frequency of about 2 Hz forpassing only the DC component of the signal. The AC component detectioncircuitry 256 may be of the type disclosed in U.S. Pat. No. 4,459,548,and includes a bandpass filter set to attenuate ignition noise and 60 Hzpower line noise, detectors for the peaks and valleys of the ACcomponent and a summer to give the peak-to-peak amplitude of the ACcomponent. The output of the AC component detection circuit 256 isapplied to the inverting input terminals of each of two comparators 260and 261. The DC component at the output of the low pass filter 257 isapplied to an absolute value generator 258, the output of which isalways positive, and which is fed through a resistor 262 to thenon-inverting input of the comparator 260, and then from the resistor262 through a voltage divider, comprising resistors 263 and 264, to thenon-inverting input of the comparator 261. The values of the resistors262-264 are set so that the input to the non-inverting terminal of thecomparator 260 is 0.6 of the DC component and the input to thenon-inverting terminal of the comparator 261 is 0.4 of the DC component.

The alternator diode test circuitry 255 is designed to test the ratio ofthe AC component to the DC component of the current signal from the Hallprobe 206, as is explained in greater in detail in the aforementionedU.S. Pat. No. 4,459,548. Thus, it can be seen that, if the AC/DC ratiois greater than 0.6, both of the ALTEST 1 and 2 signals which are,respectively, the outputs of the comparators 260 and 261, will be low,indicating that the alternator diodes are bad. If the AC/DC ratio isless than 0.4, the outputs of both of the comparators 260 and 261 willbe high, indicating that the diodes are good. If the AC/DC ratio isgreater than 0.4 but less than 0.6, the output of comparator 260 will behigh and the output of comparator 261 will be low, indicating that thecondition of the diodes is marginal. As was indicated above, thealternator diode display 228 can be toggled on by actuation of theON/OFF key to indicate whether the diodes are "Good," "Marginal" or"Bad."

The analog circuits 230 also include a power supply 268 which receivesthe +6.5 V supply voltage from the supply circuits 235, and regulates itto V⁺ V⁻ supply voltages for the analog circuits.

Digital Circuits

Referring now to FIG. 11, the digital circuits 240 are the controlcenter for the tester 200. They include a microprocessor controller 270and an associated EPROM 271, a latch 272 and a non-volatile RAM 273, aswell as two port expanders 274 and 275, each of which has two 8-bitports, a 6-bit port and 256 bytes of RAM. The digital circuits 240 alsoinclude a fast analog-to-digital converter ("ADC") 276 and a slow ADC277. The microprocessor 270 has a crystal-controlled master clockfrequency of 6 MHz, which is divided by clock dividers 278 into a 1 MHzclock signal for controlling the fast ADC 276 and a 250 KHz clock signalfor controlling the slow ADC 277. The microprocessor 270 communicateswith the EPROM 271, the latch 272, the RAM 273 and the port expanders274 and 275 via a multiplex address/data bus 280. The addresses for theEPROM 271 and the RAM 273 are latched in the latch 272 and arecommunicated to the EPROM 271 and the RAM 273 via an address bus 281when the bus 280 is carrying data. The digital circuits 240 also includea digital-to-analog converter ("DAC") 282 which feeds a DC offsetcompensator 283. Digital data is communicated from the ADC's 276 and 277to the microprocessor 270, and from the microprocessor 270 to the DAC282 via a data bus 284. The DAC 282 is controlled by DACCS and DACWRsignals from the port expander 274.

The keyboard 210 is connected to the digital circuits 240 via keyboardcable 285 and, more specifically, the keyboard cable 285 is connected tothe port expander 275 and to a keyboard interrupt circuit 286. Whilecable 285 has been illustrated connected to the keyboard interruptcircuit 286, actually two of the conductors thereof corresponding,respectively, to the ZERO key and the STOP/RESET key, are not connectedto the keyboard interrupt circuit 286. The conductor corresponding tothe STOP/RESET key is, however, connected to a power up protect circuit287 and to the microprocessor 270 for communicating a RESET signalthereto. The power up protect circuit 287 is connected to the RAM 273and disables it when the STOP/RESET key is pressed or, on power up,until full power is established. The RESET input of the microprocessor270 is also provided with an RC timing circuit (not shown) whichdisables the microprocessor 270 on power up until full power isestablished.

The keyboard interrupt circuit 286 outputs a KEY signal to themicroprocessor 270 for indicating that some key (other than the ZERO orSTOP/RESET keys) has been actuated, and this actuates a portion of aprogram software, discussed below, to sample the information in the portexpander 275 to determine which key was pressed and initiate theappropriate program routines. The keyboard interrupt circuit 286includes an RC network with a time constant of 2 seconds. This isbecause the software is setup to look for a key to be released beforereturning to the main program from the key interrupt subroutine. In theevent that a user presses a key and fails to release it, the RC circuitwill generate the KEY signal to the microprocessor 270 at the end of 2seconds to permit the main program loop to continue, thereby effectivelyproviding "debounce" for the keyboard 210.

The digital circuits 240 also include a rotary decoder 288 whichreceives the LOADSET signal from the rotary encoder 243 (see FIG. 8) anddecodes it. The rotary decoder 288 outputs a ROTDIR signal to the portexpander 274, to indicate the direction in which the load set knob 205was turned, and outputs a ROTCLK signal to the microprocessor 270 totrigger a rotary decoder interrupt in the main program routine, as willbe explained more fully below. The rotary encoder 243 is scaled so thatone ROTCLK pulse will be generated for each predetermined arc segment ofrotation of the load set knob 205. Thus, for example, one complete 360°rotation of the load set knob 205 may generate 40 ROTCLK pulses from therotary decoder 288. The digital circuits 240 also include a regulator289 which receives the +6.5 V voltage from the supply circuits 235 andregulates it to a V⁺ supply voltage for the digital circuits 240, thissupply also being provided to the display driver 245 (see FIG. 8).

The microprocessor 270 generates the SW1 and SW2 signals and outputsthem through the port expander 274 to the analog circuits 230 fortoggling the test signal switch 252 between its current and voltageinputs. The switched output is applied as TEST SIG to the slow ADC 277of the digital circuits 240. The LOADSENSE signal from the feedbackshunt resistor 63 of the carbon pile assembly 30 (see FIG. 8) is appliedto the fast ADC 276, this signal being representative of the loadcurrent through the battery being drawn by the carbon pile assembly 30.Each of the ADC's 276 and 277 is free running, the microprocessor 270controlling them only when data is to be read therefrom. The ADC's 276and 277 respectively send FSTAT and SSTAT status signals to themicroprocessor 270 via the port expander 274, to indicate when aconversion is complete and data is available. Readout from the ADC's 276and 277 are respectively controlled by FEN and SEN enable signals whichare received from the microprocessor 270 via the port expander 274.

Both of the ADC's 276 and 277 are 12-bit converters. Thus, the 1 MHzclock frequency results in a conversion rate of 120 Hz for the fast ADC276, while the 250-KHz clock signal results in a conversion rate of 30Hz for the slow ADC 277. As was indicated above, the slow ADC 277alternates between taking one current reading from the Hall probe 206,then one voltage (either battery or external, but not both) reading.Once four of each type of reading is taken, the microprocessor 270averages these readings and updates the displays. More specifically, itoutputs, through the port expander 274, the DISPLAY DATA signal and aDLEN enable signal to the display driver 245 (see FIG. 8) to update theLCD display panel 220. The DLEN enable signal is also applied to thesupply circuits 235 for a purpose to be explained below. Since the slowADC 277 is running at a 30 Hz conversion rate and averaging is doneafter every 8 conversions, it will be appreciated that the displays areupdated approximately 4 times per second.

The DC offset compensator 283 allows the analog current signal from theHall probe 206 (which is used only during an alternator test) to bezeroed when the ZERO key is pressed. In this event, the microprocessor270 automatically zeros the amps reading it gets from the slow ADC 277by storing it as an offset value and updating the display accordingly.The microprocessor 270 then sends out a code via the bus 284 to the DAC282 which is equivalent to the value of the amps signal which wasdigitally auto-zeroed for the numeric current display 224. This code isconverted to an analog signal, and the DC offset compensator circuit 283then sends it to the analog circuits 230 (FIG. 9) as the AMPOFFSETsignal, where it is summed with the signal from the Hall probe 207 inthe offset compensation circuit 254, which is used for zeroing theanalog signal applied to the alternator diode test circuitry 255 for usein the alternator diode test.

The digital circuits 240 also receive a LOBAT signal from the supplycircuits 235, this signal being applied to the microprocessor 270through the port expander 274 to indicate whether or not the batteryvoltage is sufficient to safely operate the stepper motor 50 of thecarbon pile assembly 30. The ALTEST 1 and 2 signals from the analogcircuits 230, which indicate the condition of the alternator diodes, areapplied to the microprocessor 270 through the port expander 275. TheHOME signal, which indicates that the HOME switch 244 of the carbon pileassembly 30 is closed, is applied to the microprocessor 270 through theport expander 275. The microprocessor 270 also outputs a number ofcontrol signals for controlling the operation of the carbon pileassembly 30. More specifically, a SOLENOID signal is output through theport expander 275 to the supply circuits 235 for controlling thesolenoid 242 (FIG. 8), and a number of signals are output as a compositeMOT signal to the supply circuits 235 for controlling the stepper motor50. More specifically, these signals include a MOTORHOME signal, whichis output through the port expander 275, and DIREC, STEP, HALF/FULL, andENERGIZE signals, which are output directly from the microprocessor 270.

Supply Circuits

Referring now to FIG. 10, the main functions of the supply circuits 235are to regulate the battery power to +6.5 V and to drive the steppermotor 50 and the solenoid 242 of the carbon pile assembly 30. The BATTsignal, which is the voltage across the carbon pile assembly 30, isapplied to a power supply circuit 290, which generates the +6.5 V supplywhich, in turn, is fed to the analog circuits 230 and the digitalcircuits 240, as was explained above. The power supply circuit 290 alsooutputs a V_(REF) signal which corresponds to a battery voltage of about+5.6 V, and is applied to the inverting input of a comparator 291. TheBATT voltage is also attenuated in an attenuator 292 and applied to thenon-inverting input of the comparator 291 for comparison to the V_(REF)voltage to generate the LOBAT signal, which is applied to the digitalcircuits 240. If the attenuated battery voltage is greater than +5.6 V,the LOBAT signal will be high to indicate that the battery voltage issufficient for proper operation of the tester 200, otherwise it will below to indicate a low battery condition.

The BATT voltage and V_(REF) signal are also applied to a stepper motorcontrol circuit 293, which also receives the composite MOT signal fromthe digital circuits 240 and translates them into stepper motor phasesequences, which are output as a composite MOTDR drive signal to thestepper motor 50 (see FIG. 8). More specifically, when the DIREC signalis high, the carbon pile load will be increased and when it is low, theload will be decreased. The STEP signal causes the motor 50 to step inthe direction indicated by the DIREC signal. When the HALF/FULL signalis high the motor will half step and when it is low the motor will fullstep. When the MOTORHOME signal goes low, it resets the phase sequenceof the motor 50 to its home state. The ENERGIZE signal enables thestepper motor control 293.

The power supply circuit 290 also outputs a V⁺ supply voltage to adisable circuit 294 which is, in turn, connected to the stepper motorcontrol 293. The disable circuit 294 operates, on power up, to disablethe stepper motor control 293 for about two seconds until the power hasramped up to the full power supply, and it does this by effectivelyshorting the ENERGIZE signal to ground. This helps assure less sparkingat the battery clamps 208 when the clamps are initially hooked up to thebattery.

The solenoid 242 (FIG. 8) is driven through an AND gate 295 which gatesfour different logic signals. One input is the V⁺ supply voltage, whichis applied through an RC timing circuit including a resistor 296 andcapacitor 297, which disables the solenoid 242 for a brief time duringpower up to ensure that the supply voltage has completely ramped up toits operating value. The second input to the AND gate 295 is the HOMEsignal from the home switch 244 of the carbon pile assembly 30 (see FIG.8). The third input is from a watchdog timer 298, which is reset by theDLEN signal from the digital circuits 240. As was explained above, thissignal enables the display driver 245 to update the LCD display 220approximately four times per second. If a DLEN pulse is not received forabout three seconds, the watchdog timer 298 will time out, sending itsoutput low to turn off the solenoid 242. This is a safety feature. Inthe event the microprocessor 270 were to get lost in its code, the DLENsignal could stop pulsing and the solenoid would then be disabled by thewatchdog timer 298 in order to prevent a potentially hazardoussituation. The fourth input to the AND gate 295 is the SOLENOID signalfrom the digital circuits 240, which is the enable signal for thesolenoid 242.

When all of its inputs are high, the AND gate 295 will go high totrigger a solenoid driver 299, which also receives the +6.5 V supplyvoltage from the power supply 290. The solenoid driver 299 will outputthe SOLDR drive signal to the solenoid 242 for closing the solenoidcontacts, thereby connecting the battery to the carbon pile assembly 30and allowing current to flow therethrough. The drive current through thesolenoid 242 is returned to the solenoid driver 299 as the SOLDOUTsignal. Thus, it will be appreciated that the SOLENOID signal willengage the solenoid 242 only if the power up time delay has expired, thecarbon pile assembly 30 is away from its home position, and the displaydriver 245 has been pulsed by the DLEN enable signal within the lastthree seconds.

Operation

The operation of the tester 200 will be described in detail with the aidof the program flow chart illustrated in FIGS. 12A-20E. In this regard,the main program loop 300 is illustrated in FIGS. 12A-12C while FIGS.13-18, respectively, illustrate the DOAMPS, DOVOLTS, DOAVERAGE, SPEEDY,HOMER, and GOHOME subroutines which are called from other points in theprogram, FIG. 19 illustrates the ROTARY ENCODER INTERRUPT subroutine andFIGS. 2OA-E illustrate the KEYBOARD INTERRUPT subroutine.

A. Power Up-Initialization

On power up, i.e. when the battery clamps 208 are connected to thebattery terminals, the power supply circuit 290 in the supply circuits235 comes into regulation and then the other supplies 268 (FIG. 9) and289 (FIG. 11) also ramp up. As indicated above, there is a built inpower up delay in the microprocessor 270, provided by a suitable RCcircuit (not shown) at the RESET input, to prevent the microprocessor270 from beginning its initialization until the power supplies have hadtime to come into regulation. Also, as indicated above, the power upprotect circuit 287 will maintain the RAM 273 disabled during power up,and the disable circuit 294 will maintain the stepper motor control 293disabled during power up. These power up protections are to make surethat the full power supply voltages are available before initialization,since otherwise the microprocessor 270 could start to generate spuriousoutput signals. Upon completion of power up, the microprocessor 270 willbegin executing its program, stored in the EPROM 271.

Referring to FIGS. 12A-B, the program will enter the main program loop300 and the microprocessor 270 will begin initialization, firstinitializing all its flags and internal registers. In this regard, theflag for the analog test signal switch 252 ("ANSW") will be set to theamps position.

The program then tests all the lamps and calls the HOMER subroutine toposition the stepper motor at the home position of the carbon pileassembly 30.

1. HOMER Subroutine

The HOMER subroutine is illustrated in FIG. 17. The subroutine firstturns on the "Frozen" display 226 and the "Low Battery" display 227, ifneeded. Next the stepper motor control 293 is set to its home sequenceby the microprocessor 270 outputting the MOTORHOME signal, as explainedabove. Next the LCD displays are updated and the program checks to seeif the home switch 244 is bad at decision 301. It does this by checkingthe home switch status stored in RAM 273. If the home switch is bad, theprogram would skip to block 302. If not, the program will proceed fromdecision 301 to start stepping the carbon pile assembly 30 back to itshome position, checking the home switch 244 after each step so it willknow when the home position has been searched and, after every 256steps, will test the home switch to make sure it is functioningproperly. More specifically, the program first sets the step counter to256, and then will decrease the carbon pile load by stepping the motor50 back one step and decrementing the step counter at block 303. This iseffected by the microprocessor 270 outputting the appropriate MOTsignals to the stepper motor control 293. The program then clears thebad home switch flag and asks at decision 304 if the home switch isclosed, indicating that the carbon pile assembly 30 has returned to itshome position. If it has, the program will go directly to block 305,where it stores the home switch status in the RAM 273. The program willthen turn off the solenoid by removing the solenoid signal, reset thestepper motor control 293 to its home sequence and return to the callingroutine, which, in this case, is the main program loop. If the homeswitch is not closed at decision 304, the program sets the bad homeswitch flag and asks at decision 306 if the step counter has decrementedto zero. If not, the program returns to block 303 and steps the motorback another step. The program will continue looping in this fashionbetween blocks 303 and 306 until the step counter reaches zero. Since,at that point, the carbon pile assembly 30 still has not reached itshome position, the program proceeds to block 302 and resets the stepcounter to 256. But before continuing to step the motor, it will firstcheck to make sure the home switch is not bad.

Thus, the program now turns on the solenoid 242 by causing themicroprocessor 270 to output the SOLENOID signal. The purpose of this isto connect the carbon pile assembly 30 to the battery to determine ifthere is any load current flowing. If there is not, then the carbon pileassembly 30 must have reached its home position, and there must besomething wrong with the home switch. Accordingly, the program thencauses the microprocessor 270 to read the fast ADC 276 to sample theLOAD SENSE signal, which is the battery load current. It does this byoutputting an FEN enable signal to the fast ADC 276, assuming that anFSTAT status signal has been received indicating that an ADC conversionhas been made. The program then asks that decision 307 if the current isless than 4 amps. If so, this is considered to be a no load condition,and the program will skip to decision 308 to check again if the homeswitch is closed.

If the current is not less than 4 amps at decision 307, then there is aload on the battery and the carbon pile assembly 30 has not, in fact,returned to its home position. Accordingly, the program will thenimmediately turn off the solenoid to remove the load from the battery,then wait for the fast ADC 276 to complete its next conversion, asindicated by the FSTAT signal, and then pulses the DLEN signal to resetthe watchdog timer 298 for the solenoid, and then returns to block 303to continue stepping the motor back.

If the current had been less than 4 amps at decision 307 indicating afaulty home switch, the program would proceed to decision 308 to ask ifthe home switch is closed. If it is, as it should be, the program skipsto block 305 and stores the home switch in the ram 273, then proceeds toturn off the solenoid 242 and resets the motor to its home sequence andreturns to the calling routine. If, at decision 308, the home switch isnot closed, the program sets the bad home switch flag before moving toblock 305, so that now a bad home switch flag will be stored in ram 273.

Returning to the main program in FIG. 12A, after the carbon pileassembly 30 has been returned to its home position, the program thenblanks all the LCD displays. This completes initialization.

B. Main Loop

The program now proceeds into its main loop at decision 309 to check tosee if the battery is low by checking the status of the LOBAT signalfrom the supply circuits 235. If the battery is low, the program abortsany test in progress by again calling the HOMER subroutine, and thenflashes the "Frozen" and "Low Battery" displays 226 and 227, and theprogram then returns to decision 309. It will continue in this flashingloop until the operator presses the FREEZE/LIVE key to unfreeze thedisplay. The HOMER subroutine is called in this loop because decision309 can be entered, not only on power up, but also through the block 310and the carbon pile assembly 30 may have been moved from its homeposition later in the program.

If, at decision 309, the battery is not low, the program skips to block311 and turns off the "Low Battery" display 227. It then clears the ADCregisters and sets the ADC counters, the fast conversion counter ("FCC")being set to the count of 3 and the slow conversion counter ("SCC")being set to a count of 0. These counters are incremented each time aconversion in the corresponding ADC is made, i.e., in response to theFSTAT and SSTAT SIGNALS. The fast ADC 276 is running four times as fastas the slow ADC 277, so it will make four conversions for every oneconversion of the slow ADC 277. The first time through the loop it isdesired to take a slow ADC reading immediately, and this can be doneonly after four fast ADC conversions have been made. Thus, the FCC isset at three so that the first fast conversion will bring it to four andpermit a slow ADC reading to be taken. The program then sets the analogtest signal switch 252 to the amps position. This is accomplished by themicroprocessor 270 outputting the appropriate SW1 and SW2 signals to thetest signal switch 252. The switch and its flag are set separately toallow settling time for the switch.

The program then checks decision 312 to see if the auto zero flag isset. This flag is set during initialization. If it is set, the programcalls an auto zero subroutine (not shown) to zero the current signalfrom the Hall probe 206 and then clears the flag and exits thatsubroutine and proceeds to block 313. Otherwise, the program goesdirectly from decision 312 to block 313 and waits for a slow ADCconversion, and then to block 314 to wait for a fast ADC conversion,whereupon the program now knows that it has good pieces of data in eachof the ADC's 276 and 277.

The program now asks at decision 315 if the "Frozen" flag is set. If so,the program returns directly via point 310 to decision 309 to repeatthis portion of the main loop, since it does not need to take any moreADC readings. On power up the "Frozen" flag will not be set, so theprogram asks at decision 316 if this is the first pass through theprogram. If it is not, the program turns on the keyboard interrupt but,since this is the first pass the program bypasses the keyboard interruptso as not to permit the user to interrupt the program by a key actuationduring the first loop through the program. Next, at block 317, the FCCis incremented, and the program then checks at decision 318 to see ifthe FCC is at 4. If not, the program skips to block 319. On the firstfast through, the FCC will be at 4 because it was initially set at 3, sothe program then waits for a slow ADC conversion and sets a flag to takea slow ADC reading, and then turns off the keyboard interrupt at block319.

The program then asks at decision 320 if the timer display 222 should beon. It should be if a timed test, such as a battery load test or analternator test has been selected by the user by actuation of theappropriate one of the START keys 211 or 213. Since this is the firstpass through the program, those keys are inactive, so the timer shouldnot be on and the program skips directly to block 321, where it readsthe fast ADC. If a timed test had been selected at decision 320, theprogram would proceed to decrement the timer counter by one count. Thetimer counter essentially counts the fast ADC conversions. Since theprogram can loop through the main loop only about 89 times per second,this timer is set for 89 counts per second. The program then asks atdecision 322 if one second has expired. If not, it drops to block 321,and if so it next asks if decision 323 if the seconds timers has reachedzero. If not, the program updates the timer display 222, decrementing itone second, and then reads the fast ADC at block 321, scales thatreading and then proceeds to decision 324. If, after decision 323, theseconds timer had reached zero, this would mean that a timed test hadbeen completed, and the program would then proceed to the GOHOMEsubroutine, which will be explained more fully below.

At decision 324, the programs checks to see if the alternator test flaghas been set, i.e., whether the alternator test has been selected by theoperator actuating the START key 213. If it has, the programs skips todecision 325. On power up, the alternator test cannot have beenselected, so the program proceeds to decision 326 to check to see if thebattery load current, which was just read from the fast ADC, is lessthan, greater than or equal to the LOADSET value. The tester 200 ispreferably set up with a default LOADSET value of 25 amps, but this canbe manually changed by the operator by actuation of the load set knob205. On power up the LOADSET will be at the default value. If themeasured load current reading is equal to the LOADSET the program doesnothing and proceeds to decision 325. If it is lower than the LOADSETvalue by two amps or more, the program increases the load by themicroprocessor outputting the appropriate MOT signals to the steppermotor control 293. If the measured load reading is greater than theLOADSET by two amps or more, the program decreases the load by backingoff the stepper motor control 293 by one step. As is explained morefully below, on power up the program is looping through its main loop inan idling condition. Thus, while it causes the appropriate MOT signalsto be generated, the ENERGIZE one of those signals will be off, so thatthe stepper motor 50 will not respond, until a battery load test or analternator test is selected by the operator.

At decision 325, the program checks to see if a slow ADC reading shouldbe taken. Such a reading should be taken every four fast ADCconversions. If it is not time to take a slow ADC reading, the programreturns through a delay to the block 314 to wait for the next fast ADCconversion and will continue looping through this portion of the programuntil four fast ADC conversion readings have been taken. Since this isthe first pass through the program, it will be time to take a slow ADCreading, since the FCC was caused by its preset to increment to four onthe first pass, as explained above. Thus, the program will take a slowADC reading, which will be an amps reading since the test signal switch252 was originally set to the amps position, and then will switch thetest signal switch 252 back to the volts position, so that the next timea slow ADC reading is taken it will be a volts reading. Next, theprogram polls the ZERO key and, if it has been pressed, sets the autozero flag. This flag will be detected at decision 312 on the next loopthrough the program. The program then drops to decision 327 to see ifthe amps or volts flag is set, i.e., whether the flag for test signalswitch 252 is in the amps position or the volts position. Since the flagwas initially set in the amps position during power up, as indicatedabove, the program will proceed to call the DOAMPS subroutine.

1. DOAMPS Subroutine

This subroutine subtracts off the auto zero registers from the last slowADC amps reading and linearizes the reading if it is over 300 amps. Italso tests the ALTEST 1 & 2 signals from the alternator diode testcircuitry 255 (FIG. 9) if the alternator diode test is active. Itupdates the bar graph display registers and adds the latest currentsignal (after the auto zero and linearization) to the current sumregisters.

Referring to FIG. 13, the DOAMPS subroutine first checks at decision 328to see if the battery load test flag is set. This flag is set by theoperator pressing the START switch 211. If it is set, the program skipsto decision 329. Since it will not be set on the first pass through theloop, the program will proceed to add to the ADC amps registers any autozero offset which may have been set, and then proceeds to ask atdecision 330 if the amps reading is greater than 300 amps. If it is, theprogram linearizes the amps reading and then proceeds to decision 329 tosee if the alternator diode test flag is set. If the amps reading isless than 300 amps, the program skips the linearization step andproceeds directly to decision 329.

If the alternator diode test flag has not been set (by operatoractuation of the ON/OFF key), the program will turn off the alternatordiode display 228, and will then skip to decision 331. If the alternatordiode test flag had been set, the program would first read thealternator diode test inputs, i.e., the ALTEST 1 and 2 signals, and thenturn on the appropriate indicator in the alternator diode display 228before proceeding to decision 331. The program next checks at decision331 to see if the battery load test flag has been set by the useractuating the START key 211. On start up it will not have been set, sothe program will skip to decision 332. If it had been set, the programwould first scale the last fast ADC current reading and then load theslow ADC current registers with the data from the fast ADC registers. Inother words, in the event that the battery load test has been selected,the program uses the LOAD SENSE current reading from the carbon pileassembly 30 rather than the alternator current reading from the Hallprobe 206, and it does this by simply overwriting the slow ADC currentregisters with the reading from the fast ADC.

The program then proceeds to decision 332 to check to see if the"Frozen" flag has been set by the user toggling the FREEZE/LIVE key. Ifit is set, the program skips to block 333. It will not be set on thefirst pass through the program, so it will then update the bar graphdisplay 225 before proceeding to block 333, at which point it will addthe latest slow ADC amps reading to the previous amps readings and willstore the sum. The program then switches the flag for the test signalswitch 252 to the volts position and returns to the main program loop atthe AVERAGE block. Thus, the next time it is time to take a slow ADCreading at decision 325 in the main program loop, the reading taken willbe a voltage reading because the test signal switch 252 is now in thevolts position and, at decision 327, the main loop program will branchto call the DOVOLTS subroutine, since the flag for the test signalswitch 252 is also in the volts position.

2. DOVOLTS Subroutine

This subroutine compares the measured battery output voltage to theLOADSET value for the alternator test and then controls the motor toincrease or decrease the load to regulate to the LOADSET value. It alsochecks to see if the battery cables have been removed from the batteryand then adds the latest voltage battery reading to the voltage sumregisters.

Referring to FIG. 14, the DOVOLTS subroutine first checks at decision334 to see if the alternator test flag has been set. If not, it skips todecision 335. If the alternator output test has been selected, theprogram will proceed to decision 336 to compare the volts reading justtaken from the slow ADC to the LOADSET value which, in the defaultcondition, is set at 12.4 volts for a 12-volt battery and 6.2 volts fora 6-volt battery. This default setting can be changed by the operator byuse of the load set knob 205 once the alternator output test has beeninitiated, but this is rarely done. If the volts measurement is equal tothe LOADSET value, nothing is done and the program drops to decision 335directly. If the measured voltage reading is greater than the LOADSETvalue, the program will increase the load by one step of the motor 50,thereby to decrease the battery output voltage and then go to decision335. If the measured voltage is less than the LOADSET value, the programfirst checks at decision 337 to see if the carbon pile assembly 30 isalready at its home position. If it is not, the program decreases theload by one motor step, thereby increasing the battery output voltage,and proceeds to decision 335. If the carbon pile assembly 30 is alreadyat its home position, the program does not decrease the load, but ratherdrops directly to decision 335, since if the carbon pile assembly 30 isbacked off beyond its home position it risks damage to the assembly.

At decision 335, the program checks to see if the battery clamps 208have been removed from the battery (e.g. had accidentally fallen offduring a test), which would be indicated by the battery voltage havingdropped substantially to zero. If so, the program sets the open leadflag and proceeds to block 336 where it adds the latest voltage readingfrom the slow ADC to the sum of the previous readings and then storesthe voltage sum. If the voltage leads have not been removed from thebattery, the program proceeds from decision 335 directly to block 335a.After storage of the voltage sum, the program switches the flag for thetest signal 252 back to the amps position and then returns to the mainprogram.

The main program loop then drops to decision 337 to see if it is time tocalculate an average. An average is calculated after four amps readingsand four volts readings have been taken from the slow ADC, i.e., aftereight consecutive readings from that converter, since the input to thatconverter is being toggled back and forth between amps and volts signalsby the test signal switch 252. If it is not yet time for an average tobe taken, the program returns to block 314 and waits for the next fastADC conversion. If it is time to calculate an average, the program callsthe DOAVERAGE subroutine.

3. DOAVERAGE Subroutine

Referring to FIG. 15, the DOAVERAGE subroutine first checks at decision338 to see if either the alternator test or the battery load test flaghas been set. If not, it will proceed directly to block 339 to initiatethe averaging functions. If either of the alternator test or the batteryload test has been selected, the program asks at decision 340 if theexternal volts flag has been set by the user toggling theBATTERY/EXTERNAL key. This will be done if the operator wishes tomeasure an external voltage which is connected to the External VoltsTerminals 215, rather than the battery voltage. If this test has notbeen selected, the program will skip to decision 341, and this will bethe normal situation. At decision 341 the program asks if the open leadflag has been set. If it has, the program clears the bad switch flag andthen calls the GOHOME subroutine to terminate the test in progress, aswill be explained more fully below. If the open lead flag is not set,the program drops to block 339 and averages the sum of the last fourcurrent readings from the slow ADC and stores that average and thenaverages the sum of the last four voltage readings and stores thataverage, and then returns to the main program loop at the DONE block(FIG. 12B).

In the event that the external volts flag had been set at decision 340,the program would store the present ADC setup and switch the analog testsignal switch to the volts position, then wait for one complete cycle ofthe slow ADC 277 and then check at decision 342 to see if the batteryvolts reading is less than one volt. If it is, the program will set theopen lead flag, and if not, it will clear the open lead flag and, ineither case, will then proceed to restore the saved ADC setup and thendrop to decision 341. In other words, if the external volts flag is set,the program stores everything momentarily and, before taking itsaverages, takes a voltage reading to be sure that there is an inputconnected to the battery cables 209.

Referring again to FIG. 12B, after the averaging process is completed,the main program loop drops to decision 343 to see if the alternatoroutput test is active. An integral part of that test is the terminationof the maximum alternator current output during the test, so if the testis active the program will determine the maximum current reading todate, this current reading being obtained from the Hall probe 206 in thecase of the alternator output test. More specifically, themicroprocessor 270 compares each displayed average current reading withthe highest-value previous averaged reading and, if it is greater,stores it. The program then drops to decision 344 to see if the ampsreading is above 2000 amps. If it is, the program blanks the currentdisplay 224 to indicate an error reading and then drops to block 345 toup date the displays. If the current reading is less than 2000 amps theprograms drops directly from decision 344 to block 345. The program thenreturns at point 310 to begin the main loop again.

In summary, during the main loop of the program, it repeatedly takesreadings from the ADC's, taking a reading from the slow ADC 277 afterevery four readings from the fast ADC 276. The inputs to the slow ADC277 are alternated between current measurements and voltagemeasurements, so that the readings therefrom alternate similarly. If abattery load test is selected by the operator, the program will, aftereach current reading from the slow ADC, override it with the latestvalue of current from the fast ADC so that battery current rather thanHall probe current is stored. After eight consecutive readings have beentaken from the slow ADC the four amps readings and the four voltsreadings are each averaged and the program then updates the numericdisplays in accordance with the average values. This will happen aboutfour times per second.

It will, of course, be understood that the slow ADC 277 will not receiveany current input signals unless the operator has clamped the Hall probe206 to a current-carrying conductor, and this will not be done unless atest, such as the alternator output test, is to be performed. Until atest has actually been selected by the operator, the main program loopsimply continues taking readings from the ADC's and updating thedisplays, but nothing is done to the carbon pile assembly 30. Theprogram will continue sending load increase or load decrease signals tothe stepper motor control 293, but nothing will happen since, onceinitialization is completed and the carbon pile assembly 30 has beenreturned to its home position, the stepper motor 50 will not again beenergized until either a battery load test or an alternator test isselected by the operator. Thus, the main program will continue in thisidling condition, waiting for the operator to actuate a key or alter theLOADSET value by actuating the load set knob 205.

When the tester 200 is in its idling condition after power up the LOADdisplay 221 will display the default 25-amps load, or whatever otherload has been preselected by the operator by use of the load set knob205, as will be explained in greater detail below. The timer display 220will display the default 15-second time period, the volts display 223will display the battery voltage as measured by the BATT/VOLTS input tothe analog circuits 230 from the battery cable messenger wires, thecurrent display 224 will display zero, the bar graph display 225 willregister zero, the "Frozen" display 226 will be off, the "Low Battery"display 227 will be off unless the battery voltage is below 5.6 volts,the alternator diode display 228 will be off and the "Maximum" displaywill be off.

C. Rotary Encoder Interrupt

Once the tester 200 is powered up, the operator can alter the defaultLOADSET value by operating the Load set knob 205. He will normally do soif he is planning to conduct a battery load test, since such a test istypically run with the battery loaded to one-half its cold cranking ampsrating, which will almost always be greater than the default 25 amps.Rotation of the load set knob 205 will trigger the ROTARY ENCODERINTERRUPT subroutine. More specifically, rotation of the load set knob205 causes the rotary encoder 243 to send the LOADSET signal to therotary decoder 288 (FIG. 11), which then outputs a negative-going ROTCLKpulse to the microprocessor 270, and it is this negative goingtransition which triggers the ROTARY ENCODER INTERRUPT. As indicatedabove, the rotary decoder 288 will output a series of ROTCLK pulses, thenumber depending on the degree of rotation of the load set knob 205.

Referring to FIG. 19, this interrupt subroutine first turns off themaster interrupt control so that no other interrupts can occur. Theroutine then checks to see if either the "Frozen" condition or thestarter draw test is active at decision 346. If so, there is no need toupdate the LOADSET value, so the program will skip to block 346a to waitfor the ROTCLK pulse to go back high, whereupon the program willreenable the master interrupt control and exit the interrupt subroutine.If the answer at decision 346 is NO, the program next determines atdecision 347 if the alternator test flag has been set since, if it is,the LOADSET value must be measured in volts rather than amps. In thatcase, the program proceeds to decision 348 to determine whether the loadvolts should be increased or decreased, which will be determined by thecondition of the ROTDIR signal from the rotary decoder 288 (FIG. 11).

The program has been set up with battery voltage limits beyond which thetest will not be permitted to proceed. More specifically, an upper limitof approximately 18 volts (17.92 volts) is set because a higher voltagemay damage the motor, and a lower limit of 4 volts is set, since loadingthe battery below that voltage could cause damage to the battery.Accordingly, if the operator has called for an increase in load volts(by decreasing the load on the battery), the program will check atdecision 349 to see if the battery output voltage is already at 17.92volts and, if so, it will not permit it to go any higher and will abortto block 346a and exit the subroutine. If the upper limit has not yetbeen reached, the program will cause the carbon pile assembly 30 to backoff sufficiently to add 0.03 volts to the load voltage, and then willdrop to block 350 to store the new LOADSET value. If, at decision 348, adecrease in battery voltage is called for, the program checks atdecision 351 to see if the minimum voltage of 4 volts has already beenreached and, if so, skips to block 346a and exits the subroutine.Otherwise, the program will cause the carbon pile assembly 30 toincrease the load on the battery sufficiently to subtract 0.03 voltsfrom the battery voltage and then drop to block 350 to store the newLOADSET value.

If, at decision 347, the alternator test flag is not set, then theprogram will assume that the LOADSET value is being changed for abattery load test and will change the setting in amps. At decision 352,it asks whether the LOADSET value is to be increased or decreased. If itis to be decreased, the program checks at decision 353 to see if it isalready less than 26 amps. If it is, the program skips to block 346a,since it will not display less than the default LOADSET value of 25amps. The program sets up different counting rates for different rangesof LOADSET values, counting faster for higher ranges to minimize thetime it takes to adjust the LOADSET value, while still maintaining thesame approximate percentage rate of precision. Thus, 3 ranges have beenset, viz., 25-50 amps, 50-100 amps and 100 amps and above. Accordingly,the program next checks the range of the current LOADSET reading atdecision 354. If it is less than 51 amps, it subtracts one amp from theLOADSET value, if it is between 50-100 it subtracts 2 amps, and if it isgreater than 99 it subtracts 5 amps, and then returns to block 350 tostore the new LOADSET value.

The program also sets an upper current LOADSET limit of 600 amps, sinceno test would be conducted at a load higher than that. Accordingly, ifdecision 352 had called for an increase in the LOADSET, the programwould first check at decision 355 to see if the value was already at 600amps. If so, it would abort to block 346a. If not, the program thenagain checks the LOADSET range at decision 356, and will add one amp,two amps or five amps to the LOADSET value, depending upon the range,and it will also set the +600 flag if necessary (i.e., if the increasehas brought the LOADSET value up to 600 amps), and then drops to block350 to store the new LOADSET value. The program then updates the loaddisplay 221 and proceeds to block 346a to exit the subroutine, asexplained above.

Presumably, the rotation of the load set knob 205 will cause the rotarydecoder 288 to generate more than one ROTCLK pulse. As soon as the nextROTCLK pulse arrives, the ROTARY ENCODER INTERRUPT subroutine is againentered and this will continue until the LOADSET value set has beenadjusted to correspond to the degree of rotation of the load set knob205 by the operator, which will occur in a fraction of a second. Thus,as far as the operator is concerned, the load display 221 will changealmost instantaneously to follow his rotation of the load set knob 205.

D. Keyboard Interrupt

As was explained above, the keyboard interrupt circuit 286 will beactivated when the operator presses any key other than the ZERO orSTOP/RESET key, to generate the KEY signal to the microprocessor 270,for triggering the KEYBOARD INTERRUPT subroutine. The ZERO key isrepeatedly polled in the main program loop (FIG. 12A). Actuation of theSTOP/RESET key causes a RESET signal to be applied directly to themicroprocessor 270 for resetting it and causing it to reenter the mainprogram loop at the beginning to reinitialize, just as on power up.

Depression of any other key will trigger the KEYBOARD INTERRUPTsubroutine, which is illustrated in FIGS. 20A-D. This subroutine firstdisables the keyboard and rotary encoder interrupts and then reads thekeyboard port on the port expander 275, and then goes through a seriesof decisions to determine which key was pressed, taking differentactions, depending upon which key was actuated. At decision 357, itfirst checks to see if the FREEZE/LIVE key was pressed. If so, itswitches the "Frozen" flag, since this toggles between the frozen andlive conditions of the LCD display panel 220. The program then clearsthe test flags and asks at decision 358 if the "Frozen" flag is set. Ifso, this means the operator has elected to freeze the display and abortany test in progress. Thus, the program will then call the HOMERsubroutine to return the carbon pile assembly 30 to its home positionand then jump to block 359 to wait for the KEY signal to go back high,which occurs when the operator releases the key or after the two-seconddebounce time delay of the keyboard interrupt circuit 286 (FIG. 11),whichever occurs first, and then exits the interrupt subroutine.

If, at decision 358, the "Frozen" flag was not set, meaning the operatorhad toggled from the freeze condition back to the live condition, theprogram jumps to block FR4, disables the rotary interrupt, turns off the"Frozen" indicator register, resets the timer register and displayregister to the default 15 seconds, and asks at decision 360 if the lasttest was a battery load test. If it was not, the program then resets theload set registers and display 221 to the default 25-amps load settingand, at block 361, updates the load display 221. If the last test was abattery load test, then the program leaves the load set register whereit was and proceeds immediately to block 361 to update the load display221 and then jumps to block 359 to exit the interrupt.

If the FREEZE/LIVE key has not been pressed, the program drops fromdecision 357 to decision 362 to see if the "Frozen" flag is set from anearlier actuation of the FREEZE/LIVE key. If so, the program will notrecognize any other key actuation and will immediately turn on themaster interrupt and the keyboard interrupt and exit the interruptsubroutine. If the "Frozen" flag was not set, the program checks atdecision 363 to see if the START key 213 for the alternator test waspressed. If so, if jumps to the ALTEST block (FIG. 20C), and checks atdecision 364 to see if the alternator test flag is already set, i.e., ifthis test had already been previously selected. If so, the program willignore this latest key actuation and proceed immediately to block 359 toexit the interrupt. If not, the program next checks at decision 365 tosee if either the ENERGIZE signal has been sent to the stepper motorcontrol 293, or the starter draw test flag is set. If so, this meansthat the program is already in the middle of some other test and it willagain immediately exit the interrupt. Otherwise, it will proceed todecision 366 to see if the timer is at zero. In this case, the programwill flash the timer display 222 and exit the interrupt, since there isno time to run the alternator test.

If the timer is not at zero, the program stores the current ADC, analogswitch and DAC setups, sets the analog test signal switch 252 to thebattery volts position, so that the next conversion of the slow ADC 277will be a voltage reading, waits for that conversion to occur and thenreads that reading from the slow ADC, and checks to see if it is greaterthan 7.68 volts at decision 367. If it is not, the program will assumethat it is a 6-volt battery which is being tested, and will set the6-volt flag and drop to decision 368. If it is greater than 7.68 volts,it is assumed that a 12-volt battery is being tested, so the 6-volt flagwill be cleared before proceeding to decision 368. At decision 368, theprogram asks if the battery voltage is less than 17.92 volts. If not,the voltage is too high, so the program sets the +18 volt flag,otherwise it clears that flag and then proceeds to decision 369 to seeif the voltage is less than 1 volt. If so, this indicates that thebattery cables are disconnected and the open lead flag is set, otherwisethe program clears the open lead flag and then restores the saved analogswitch, ADC and DAC set ups and checks at decision 370 to see if eitherthe open lead or the +18 volt flag is set. If so, the program will flashthe volts display 223 to call the operator's attention to the fact thatthe voltage is too high or that there is an open lead, and will thenexit the interrupt. Otherwise, the program will set the alternator testflag and clear the external volts flag, to indicate to themicroprocessor 270 that the voltage readings are to be taken from theBATT VOLTS input rather than the EXT VOLTS input of the test signalswitch 252, so that the microprocessor 270 can send the appropriate SW1and SW2 switching signals. The program then sets the register for theload display 221 at the default 12.4 load volts and then checks atdecision 371 to see if the 6-volt flag is set and will then either resetthe display registers for 6.2 volts or not, depending on the answer, andthen calls the SPEEDY subroutine to rapidly move the carbon pileassembly 30 to a position for loading the battery at a minimum defaultload of 25 amps.

1. SPEEDY Subroutine

The SPEEDY subroutine, which is illustrated in FIG. 16, sets the carbonpile assembly 30 at the default 25-amps load as fast as possible. Itfirst sets the motor control 293 to the home sequence of the steppermotor by sending the MOTORHOME signal, then enables the solenoid bysending the SOLENOID signal, enables the motor control 293 by sendingthe ENERGIZE signal, and sets the motor control 293 to its full stepmode by sending the appropriate HALF/FULL signal. In this regard, theprogram is set so that the motor will full step until a load of 256 ampsis reached, at which point it will begin to half step. The program thenpulses the DLEN enable signal at block 372 to reset the watchdog timer298 (FIG. 10), then sends a STEP signal to the motor control 293 to stepthe motor 50 one step from its home position. The program then reads thefast ADC 276, scales that reading and checks at decision 373 to see ifthe amps reading is less than 25 amps. If not, the program returns tothe KEYBOARD interrupt subroutine, otherwise, the program waits for thefast ADC 276 to complete another cycle, clears the STEP signal to themotor control 293, and returns to block 372 to again pulse the DLENenable signal. The subroutine will continue in this loop, stepping themotor at the fast ADC conversion rate of 120 Hz, until the load ampsreading reaches 25 amps.

After executing the SPEEDY subroutine, the KEYBOARD interrupt subroutinejumps to the Time Set block (FIG. 20A) and then sets the fast ADCcounter at 89 which, as indicated above, corresponds to one second, andthen sets the register for the load display 221 with the current LOADSETvalue, updates the timer display 222 and exits the interrupt.

If the alternator test had not been selected at decision 363 (FIG. 20A),the interrupt program would next check at decision 374 to see if theON/OFF key had been pressed, indicating that the operator had toggledthe alternator diode test display 228 on or off. If so, the programswitches the display and then exits the subroutine. Otherwise, theprogram drops to decision 374a to see if the BATTERY/EXTERNAL key waspressed to toggle the volts input. If so, it switches the Battery orExternal volts flag and switches the volts display 273 between "Battery"and "External." If the BATTERY/EXTERNAL key was not pressed at decision374a the program proceeds to decision 375 to see if the up arrow key waspressed, indicating that the operator is incrementing the timer. Theprogram is set to increment or decrement the timer five seconds at atime each time that an arrow key is pressed. Also, the program will notpermit the timer to exceed 30 seconds, to discourage loading the batteryfor too long a time. Accordingly, when the up arrow key is pressed, theprogram will first check at decision 376 to see if the timer is lessthan 26 seconds. If it is not, it will immediately exit the subroutine,since another 5-second addition will take it beyond 30 seconds.Otherwise, it will add five seconds to the timer register and then moveto the Time Set block and proceed as described above.

If the up arrow key was not pressed at decision 375, the program dropsto decision 377 to see if the down arrow key was pressed. If so, theprogram will check at decision 378 to see if the timer is less than 5seconds. If so, it will immediately exit the interrupt, since anotherfive-second decrease will take it below zero. Otherwise, the programwill subtract five second from the timer register and then jump to theTime Set block and proceed as described above.

If the down arrow key was not pressed at decision 377, the program movesto decision 379 to see if the START key 212 was pressed to initiate thestarter current draw test. If so, the program proceeds to decision 380to see if any other test is active and, if it is, the key depression isnot recognized and the KEYBOARD INTERRUPT subroutine is immediatelyexited. Otherwise, the program next checks at decision 381 to see if thetimer is at zero. If so, it flashes the timer display and exits theinterrupt, otherwise it proceeds to disable the rotary interrupt, clearthe ENERGIZE signal to disable the motor and change the LOADSET valueset to zero amps so that the carbon pile assembly 30 will not be loadingthe battery during the starter draw test. The program then jumps to theTime Set block as described above.

If the START key 212 was not pressed at decision 379, the program checksat decision 382 to see if the START key 211 was pressed to initiate thebattery load test. If not, the interrupt is exited, since all keys havebeen checked. If the battery load test was selected the program jumps tothe Load Set block (FIG. 20C) and checks at decision 383 to see if thestarter draw test is active and, if not, drops to decision 384 to see ifthe motor is energized, indicating that an alternator test or a batteryload test is already in progress. In any of these cases the interruptwill be exited immediately, otherwise the program next stores thecurrent setup of the test signal switch 252 and the ADC's and DAC, setsthe test signal switch 252 to the BATT/VOLTS input, waits for onecomplete cycle of the slow ADC 277 and then reads that ADC. The programthen checks at decisions 385 and 386 to see if there is an open batterylead or if the battery voltage is in excess of 17.92 volts, and clearsor sets the appropriate flags in the same manner as was described abovein connection with the ALTEST branch of the KEYBOARD INTERRUPTsubroutine. Next, the program restores the saved setup of the testsignal switch 252 and the ADC's and DAC and checks at decision 387 tosee if the open lead flag is set. If so, it flashes the volts display223 to indicate that condition and exits the interrupt, otherwise itchecks at decision 388 to see if the timer is at zero. If so, it flashesthe timer display 222 and exits the interrupt, otherwise it sets thebattery load test flag, executes the speedy subroutine (FIG. 16),described above, to rapidly load the battery to 25 amps then jumps tothe Time Set block (FIG. 20A) and proceeds to exit the interrupt, asdescribed above.

E. Battery Load Test

After the tester 200 is powered up, the operator will typically resetthe LOADSET value at a higher amps value than the default 25 amps,before initiating the battery load test. This is accomplished byrotating the load set knob 205, which initiates the rotary encoderINTERRUPT subroutine, described above in connection with FIG. 19, untilthe desired LOADSET current value appears in the load display 221. Theprogram of the tester 200 will otherwise be in its idling condition,looping through the main program loop (FIGS. 12A-B). The operator nextchecks to make sure that the "Battery" volts is displayed on the voltsand, if not, toggles the BATTERY/EXTERNAL key to bring up the properdisplay. The operator then initiates the battery load test by pressingthe START key 211.

As soon as this key is pressed, the program will enter the KEYBOARDINTERRUPT subroutine, described above in connection with FIGS. 20A-D,and will proceed down the Load Set branch of that subroutine. In thisbranch, the program will immediately operate the carbon pile assembly 30to load the battery to the 25-amp default load setting by executing theSPEEDY subroutine, described above in connection with FIG. 16. Thishappens in a fraction of a second, and then the program returns from theKEYBOARD INTERRUPT subroutine to the main program loop, increasing theload by one step of the stepper motor 50 each time through the mainloop, at the rate of approximately 89 steps per second, until thebattery load current, as measured by the LOAD SENSE signal from thefeedback resister 63 (FIG. 8), is within 2 amps of the LOADSET currentvalue displayed in the load display 221, as preset by the operator. Thiswill happen within a second or two, so the operator will see the currentdisplay 224 flash a couple different values before it settles in atabout the LOADSET value. The main program loop will maintain this loadcurrent within two amps of the LOADSET value, thereby effectivelyregulating the battery load current to the LOADSET value. It will beappreciated that, since a battery load test was selected, the currentreadings in the current display 224 are those measured in the LOAD SENSEsignal from the feedback resistor 63, since the Hall probe 206 is notbeing used. As was explained above, the main program loop accounts forthis since, each time it takes a current reading from the slow ADC 277,it execute the DOAMPS subroutine, and this subroutine recognizes that abattery load test is in progress and, therefore, overwrites the slow ADCcurrent register with the last current reading from the fast ADC 276,i.e., the shunt reading from the feedback resistor 63. Thus, when themain program loop executes the DOAVERAGE subroutine, it is LOAD SENSEcurrent readings from the feedback resistor 63 which are being averagedwhen a battery load test is in progress. This will all happenautomatically, so that the operator need not concern himself with theload being applied by the carbon pile assembly 30, and does not have totouch anything during the test. As the battery is loaded, its outputvoltage, as indicated in the volts display 223, will vary, and theoperator will monitor this display to be sure that the battery voltagestays above a prescribed minimum voltage, which will vary somewhat withthe ambient temperature. If the battery voltage does not drop below thisprescribed minimum during the test, then the battery capacity isadequate.

As the program proceeds through the main loop, it will decrement thetimer display 222 each second, so that the number of seconds left in thetest will always be visible to the operator. This time can be manuallyincremented or decremented at any time by the operator by the use of thearrow keys. Thus, for example, if the timer has timed down to fiveseconds and the operator wants to extend the test, he can add anotherfive seconds to the test each time he presses the up arrow key. When thetimer reaches zero the test is over and the main program loop will callthe GOHOME subroutine, as indicated in FIG. 12B. Essentially, thissubroutine flashes the "Frozen" display 226, freezes the other displaysand removes the load from the battery.

1. GOHOME Subroutine

More specifically, referring to FIG. 18, the GOHOME subroutine firstsets the "Frozen" and amps or volts flags, clears the battery load testflag, turns off the master interrupt control, resets the motor controlto its home sequence by sending the MOTORHOME signal and then, atdecision 389, checks to see if the alternator test or starter draw testflags are set, since those are also timed tests through which thissubroutine could have been entered. If either of those tests is inprogress, then something must be done to the displays before they arefrozen. In this instance the program has just finished the battery loadtest, so it moves immediately to block 390, where it calls the HOMERsubroutine to relieve the load from the battery by moving the carbonpile assembly 30 back to its home position, as was explained above inconnection with FIG. 17. The program then clears the ENERGIZE signal todisable the motor, and turns on the "Frozen" display 226 at block 391.The program then updates the display and, after a 1/4-second delay,turns off the "Frozen" display 226 and then, after another 1/4-seconddelay again updates the display. The subroutine then asks at decision392 if the "Frozen" flag is still set. It is, because it was set whenthe program entered this subroutine. Accordingly, the program then turnson the master interrupt and key interrupt and checks at decision 393 tosee if the battery voltage is low by checking the state of the LOBATsignal from the supply circuits 235 (see FIGS. 10 and 11). If it is, thesubroutine will be exited and the program will return to the mainprogram loop at block 310 (FIG. 12A), which will flash the "Frozen" and"Low Battery" displays 226 and 227, as was explained above. If thebattery is not low, the GOHOME subroutine will return to block 391 andrepeat the loop between block 391 and decision 393, which loop effects aflashing of the "Frozen" display 226 by means of the 1/4-second delays.The subroutine will continue in this loop until the operator presses the"FREEZE/LIVE" key. When he does, then when the subroutine reachesdecision 392 the "Frozen" flag will not be set, so the program will thenturn on the rotary interrupt and clear the ENERGIZE signal to disablethe motor and then return to the main program loop at block 310 (FIG.12A). In other words, the GOHOME subroutine unloads the battery byflashing the "Frozen" display 226 and freezes the other displays, andstays in this flashing mode until the FREEZE/LIVE key is pressed oruntil the battery goes low.

If the battery voltage had dropped below the prescribed minimum valueduring the battery load test, this could indicate that the batterycapacity was inadequate, or it could have resulted from the batterybeing insufficiently charged at the beginning of the test. The chargeshould have been checked by the operator by testing the open-circuitvoltage before the battery load test was started, but in case he did notdo so, he can monitor the battery voltage for the next five to tenminutes. If the battery voltage recovers to 12.4 volts or more, thenthis indicates that the battery does not have the required capacity andshould be replaced. If it does not recover, the battery should becharged and the battery load test repeated. If the battery fails theload test on the second attempt, the battery capacity is insufficientand it should be replaced.

F. Alternator Test

Before beginning this test, the operator should first check to see thatthe volts display 223 is indicating "Battery" volts rather than"External" volts and, if not, he should toggle the BATTERY/EXTERNAL keyto bring up the correct display. In order to perform the alternatortest, the operator must first connect the Hall probe 206 by clamping itaround the alternator output cable 155 (see FIGS. 6 and 7) . This willprovide the Hall probe current input to the analog circuits 230 (FIG.9). The operator should check to see that the alternator diode display228 is on and, if not, turn it on by toggling the ON/OFF switch. Heshould then check to see if there is any significant current reading onthe current display 224 and then "zero" the current display, ifnecessary, by pressing the ZERO key. This will cause the microprocessor270 to store the current value for use in offset compensation, as wasdescribed above. The operator should then start the vehicle engine andincrease its speed to the rpm prescribed by the manufacturer to ensurethat the alternator 154 is capable producing its maximum output.

The alternator test is initiated from the idle condition of the tester200 by the operator pressing the START key 213. This will trigger theKEYBOARD INTERRUPT subroutine, which will proceed into its ALTESTbranch, (FIG. 20C-D). This will cause the load display 221 to switch tovolts, and it will display the default reading of 12.4 volts, assumingthat the charging system 150 which is being tested includes a 12-voltbattery. The LOADSET voltage reading cannot be preset by the operator tosome value other than the default value because the load display 221will not switch from amps to volts until after the alternator test isinitiated. Once the test is initiated, the operator can alter theLOADSET reading by manipulation by the load set knob 205, and he maywish to do so if he suspects that the alternator 154 is not reaching itsmaximum current output at the default 12.4-volt load.

The timer display 222 will again start out at its default 15-second timeperiod and will time down to zero during the test, although this timecan again be manually incremented or decremented by the operator by useof the arrow keys, in the same manner as was described above inconnection with the battery load test. When the test is initiated, theALTEST branch of the KEYBOARD INTERRUPT subroutine will immediatelydrive the carbon pile assembly 30 to load the battery to the default25-amp load by means of the SPEEDY subroutine, in the same manner as wasdescribed above for the battery load test, and then return the programto the main loop. Each time the main loop of the program takes a voltagereading from the slow ADC 277, it will execute the DOVOLTS subroutine,in which it will compare the battery volts reading with the LOADSETvalue and increase or decrease the load as necessary to regulate thebattery output voltage to the LOADSET value, as was explained above inconnection with FIG. 14. Thus, the tester 200 will automaticallymaintain the battery voltage substantially at the LOADSET valuesthroughout the alternator test.

The operator will have to maintain the engine speed during the entiretest. Therefore, it is a significant aspect of the present inventionthat, once the test is started, he does not have to touch anything onthe tester 200, nor does he have to monitor any of the displays. Thetester 200 will automatically adjust the load placed on the battery bythe carbon pile assembly 30 to regulate the battery output voltage tothe LOADSET value of 12.4 volts. The program will also automaticallycapture the maximum current reading and detect it and display it in thecurrent display 224 during the test and display it at the end of thetest. Thus, as was described above, each time the program passes throughthe main loop it will determine the maximum amps reading to date and,when the timer times out, the program will execute the GOHOMEsubroutine, which will cause the maximum value detected to be displayedin the current display 224 and will turn on the "Maximum" display 229.More specifically, referring to FIG. 18, when the GOHOME subroutinereaches decision 389, the alternator test flag will have been set, sothe program will proceed to decision 394 to see if the seconds timer isat zero. It does this because this subroutine could also have beenentered from the DOAVERAGE subroutine in the event of an open leadcondition, as was explained above in connection with FIG. 15. If thetimer were not zero, the program would move immediately to block 390. Inthis case, the timer is at zero, so this subroutine must have beenentered through timeout of either the alternator test or the starterdraw test, so the program then loads the amps registers with maximum andaverage values and then checks at decision 395 to see whether it was thealternator test or the starter draw test which was just concluded. If itwas the starter draw test, the program would immediately update thecurrent displays at block 396. Since it was the alternator test, theprogram first turns on the "Maximum" display 229 before updating theamps displays and, in this case, the amps display 224 will be updatedwith the maximum current value which was read during the test. Theprogram will then clear the bar graph display 225 and move to block 390and will then continue as was described above.

If the maximum current reading is within 10% of the rated amperage ofthe alternator 154, it is considered to be good. If not, then furthertroubleshooting is required to determine if the alternator is faulty.The alternator diode test display 228 will indicate whether the diodesare "Good", "Marginal", or "Bad" in accordance with the ALTEST 1 & 2signals, as described above.

At any time, the operator can abort a test by pressing the FREEZE/LIVEkey or the STOP/RESET key. The former will freeze the displays andremove the load from the battery. If the display is frozen, in the caseof a battery load test or an alternator test when the FREEZE/LIVE key isagain pressed to return to a live condition, the display will return toits default or idle condition. However, it will continue to show thealternator diode display 228 if it had been turned on, and in the eventof a starter draw test or a battery load test, those conditions wouldcontinue to be monitored. The STOP/RESET button, on the other hand, willcompletely reset the microprocessor 270 and return it to itsinitializing routine.

In a constructional model of the invention, the test signal switch 252may be a 4052B made by Motorola, the microprocessor 270 may be an INTEL80C31, the EPROM may be a National Semiconductor 27C64, the RAM may bean S.G.S. Thomson 48Z02, the port expanders 274 and 275 may be INTEL8155's, the ADC's 276 and 277 may be Harris Corporation 7109's, theclock divider 278 may include Motorola 74LS92 and National Semiconductor4018B counters and the DAC 282 may be a National Semiconductor 0832.

From the foregoing, it can be seen that there has been provided animproved battery and charging system tester which effects automaticcontrol of a carbon pile load to provide hands-off battery load andcharging system tests by automatically regulating the battery loadcurrent or output voltage, as the case may be, to preset referencevalues, while at the same time capturing and displaying the maximumcurrent output of the charging system during a charging system test.

We claim:
 1. Apparatus for automatically loading a test circuit inaccordance with a variable parameter thereof which varies with the load,comprising:carbon pile electrical impedance means adapted to beconnected in the test circuit for loading thereof; compression meanscoupled to said impedance means for varying the compression thereof andthereby effecting variation of the impedance thereof, said compressionmeans including rotatable shaft means, and clamping means threadedlyengaged with said shaft means and adapted for engagement with the carbonpile; motive means coupled to said compression means for driving same,said motive means being coupled to shaft means for rotating same therebyto move said clamping means relative to the carbon pile for varying thecompression thereof; feedback means coupled to the test circuit forsensing the variable parameter and producing a parameter signal which isa function of the parameter; drive control means coupled to said motivemeans and to said feedback means and responsive to said parameter signalfor automatically controlling the operation of said motive means to varythe impedance of said impedance means so as to regulate the parametersignal to a predetermined value; and timing means coupled to said drivecontrol means for selectively adjusting the time period during whichsaid predetermined value is maintained.
 2. The apparatus of claim 1, andfurther comprising display means for displaying the value of theparameter signal.
 3. The apparatus of claim 1, wherein said motive meansincludes an electric stepper motor, said drive control means includingmeans for providing a binary drive signal to said stepper motor.
 4. Theapparatus of claim 1, wherein said drive control means includes meansfor comparing said parameter signal with a reference signalcorresponding to said predetermined value.
 5. The apparatus of claim 4,and further comprising means for selectively varying said predeterminedvalue.
 6. The apparatus of claim 1, wherein the test circuit includes abattery, the variable parameter being the load current through thebattery.
 7. The apparatus of claim 1, wherein the test circuit includesa battery, the variable parameter being the output voltage of thebattery.
 8. The apparatus of claim 1, wherein said drive control meansincludes processor means operating under stored program control.